/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uy.edu.ort.CentroEstudios.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 *
 * @author scirillo
 */
@Entity
public class Centro implements Serializable {
    @Id
    private String idCentro;

    @OneToMany
    private List<Grupo> grupos;
    @OneToMany
    private List<Docente> docentes;
    @OneToMany
    private List<Alumno> alumnos;
    
    public String getIdCentro() {
        return idCentro;
    }
    
    public List<Grupo> getGrupos() {
        return grupos;
    }

    public List<Docente> getDocentes() {
        return docentes;
    }

    public List<Alumno> getAlumnos() {
        return alumnos;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 37 * hash + (this.idCentro != null ? this.idCentro.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Centro other = (Centro) obj;
        if ((this.idCentro == null) ? (other.idCentro != null) : !this.idCentro.equals(other.idCentro)) {
            return false;
        }
        return true;
    }
    
}
